1. Field of the Invention
The present invention is related to computer systems and more specifically to a program development tool for automatically analyzing programming code and providing a programmer with advice with respect to modifications that could improve program performance.
2. Prior Art
The IBM personal computer (PC) architecture has become a de-facto standard for personal computers over the past decade. The main hardware part of the computer is a central processing unit (CPU) which is an INTEL Pentium.TM. brand microprocessor, random access memory (RAM), and microprocessor support chips. The IBM PC architecture uses a MICROSOFT brand disc operating system (DOS) as the software program that controls the overall operation of the computer.
Application programs, programs that perform a particular task such as word processing, are developed by many different vendors for use with the IBM personal computer. Software application programs that are written for the Microsoft DOS, Microsoft NT, Microsoft Windows or UNIX operating system by application programmers use a programming language that results in lines of code, called source code. Source code is programming instructions, written by a user, that instruct a computer to perform a series of functions. Since the actual computer logic cannot understand source code statements, the source code must be changed to more precise statements, called object code, that the computer can understand.
An assembler or compiler translates source code into object or assembly language code. Most programmers do not write programs directly in assembly language because to do so would be very tedious, requiring many lines of code to perform a simple task that in source code would require only a simple statement.
The object code created by an assembler or compiler consists of lines of code that are machine instructions, instructions that are understood by a particular computer machine's central processing unit (CPU) and that will run on that CPU. A compiler will make certain assumptions in order to preserve program semantics due to restrictions put on it by the programming language that the user has used to create the source code.
After an application program is written it is translated by a compiler into object code and is run on the microprocessor. Problem areas in the program may appear where the central processing unit (CPU) has spent a large amount of processing time. For example a large number of cache misses, branch mis-predicts, etc. Currently, engineers familiar with the microprocessor and the source code language analyze the source code at the problem areas and recommend changes that could improve the performance of the particular microprocessor. In the past, automatic tools have been available that suggest improvements of various kinds. The shortcoming is that these prior tools are labor intensive, requiring the services of a systems analyst to work with a user on problem areas targeted by the tool. It is therefore desirable to have an automated tool that a application program developer can use without the need for the services of a systems analyst.